package com.alibaba.japan.club.runtime.springmvc.pipeline;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.core.PriorityOrdered;
import org.springframework.web.servlet.ModelAndView;

/**
 * 
 * @author:shaochuan.wangsc
 * @date:2009-4-15
 * 
 */
public interface JapanEntrancePipeline extends PriorityOrdered {

	/**
	 * 
	 * @author:shaochuan.wangsc
	 * @date:2009-4-15
	 * @param request
	 * @param response
	 * @return
	 */
	public boolean isAuthorized(HttpServletRequest request, HttpServletResponse response) throws Exception;

	/**
	 * 如果<code>isAuthorized</code>方法返回<code>false</code>,则会执行该方法<br>
	 * 
	 * @author:shaochuan.wangsc
	 * @date:2009-4-15
	 * @param request
	 * @param response
	 * @return
	 */
	public ModelAndView handleEntranceInternal(HttpServletRequest request, HttpServletResponse response)
			throws Exception;
}
